﻿using System;
using System.Linq;
using Csla;
using Csla.Data;
using Csla.Serialization;

namespace Accounting.Library
{
    [Serializable()]
    public class DM_NhaCungCapCriteria : CriteriaBase<DM_NhaCungCapCriteria>
    {
        public DM_NhaCungCapCriteria() { }

        public DM_NhaCungCapCriteria(string fetchMode, string loaiNhaCungCap)
        {
            this.FetchMode = fetchMode;
            this.NhomNhaCungCap = loaiNhaCungCap;
        }

        private static PropertyInfo<string> FetchModeProperty = RegisterProperty<string>(p => p.FetchMode, "FetchMode");
        public string FetchMode
        {
            get { return ReadProperty(FetchModeProperty); }
            set { LoadProperty(FetchModeProperty, value); }
        }

        private static PropertyInfo<string> NhomNhaCungCapProperty = RegisterProperty<string>(p => p.NhomNhaCungCap, "LoaiNhaCungCap");
        public string NhomNhaCungCap
        {
            get { return ReadProperty(NhomNhaCungCapProperty); }
            set { LoadProperty(NhomNhaCungCapProperty, value); }
        }	
    }
}
